/* 大布局定位 */
html, body {
    width: 100%;
    height: 100%;
    margin: 0px;
    padding: 0px;
    overflow: hidden;
}

/* 元素居中 */
body {
    text-align: center;
}

/* 结果显示 */
#result {
    width: 200px;
    height: 50px;
    font-size: 40px;
    color: red;
    font-family: Courier, "Andale Mono", Arial, sans-serif;
}

.pic div {
    display: inline-block;
}

.btn div {
    display: inline-block;
}

#picture, #restart, #result, #change_image {
    margin-top: 10px;
    margin-left: 30px;
    margin-right: 30px; 
}

/* 拼图容器 */
#picture, #whole_picture, img{
    position: relative;
    width: 503px;
    height: 474px;
    margin-bottom: 10px;
}

/* 重新开始按钮 */
#restart, #change_image {
    cursor: pointer;
    width: 120px;
    height: 40px;
    line-height: 40px;
    background-color: #4286F5;
    box-shadow: 3px 4px 15px black;
    color: white;
    font-size: 18px;
    opacity: 0.7;
}

#restart:hover, #change_image:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* 图片分块 */
.part0 {
    background: url("swordman0.png") no-repeat;
}

.part1 {
    background: url("swordman1.png") no-repeat;
}

.part2 {
    background: url("swordman2.png") no-repeat;
}

.part3 {
    background: url("swordman3.png") no-repeat;
}

.part0, .part1, .part2, .part3 {
    transition-duration: 0.2s;
    position: absolute;
    border: solid 1px #969696;
    display: inline-block;
    width: 163px;
    height: 155px;
    margin-bottom: -4px;
    opacity: 0.9;
}

.part:hover {
    opacity: 1;
    transform: scale(1.05);
}

.position_1, .position_2, .position_3{
    top: 0px;
}

.position_4, .position_5, .position_6{
    top: 158px;
}

.position_7, .position_8, .position_9{
    top: 316px;
}

.position_1, .position_4, .position_7{
    left: 0px;
}

.position_2, .position_5, .position_8{
    left: 167px;
}

.position_3, .position_6, .position_9{
    left: 334px;
}

/* id _position_x 代表每一个分块 */
#_position_1 {
    background-position: 0px 0px;
}

#_position_2 {
    background-position: -167px 0px;
}

#_position_3 {
    background-position: -334px 0px;
}

#_position_4 {
    background-position: 0px -158px;
}

#_position_5 {
    background-position: -167px -158px;
}

#_position_6 {
    background-position: -334px -158px;
}

#_position_7 {
    background-position: 0px -316px; 
}

#_position_8 {
    background-position: -167px -316px;
}

#_position_9 {
    opacity: 0;
    background-position: -334px -316px;
    background-image: none;
}

#win {
    position: absolute;
    width: 240px;
    height: 139px;
    display: none;
    color: green;
    font-size: 50px;
}
